Conversation
…nk-to-show-all-repeat-posts
…parent doesn't exist for repeating post
… a subsection of results displayed (i.e. repeat posts for a specific repeating post)
…rect Repeat posts following the link
… Repeat post count
hm-post-repeat.php
Outdated
|
|
||
| // TODO: I think this is an expensive thing to do per each post. Maybe we can store Repeat post count in meta data? | ||
| $repeat_posts_query = new \WP_Query( get_repeat_type_query_params( 'repeat', $post->ID ) ); | ||
| $repeat_posts_count = $repeat_posts_query->post_count; |
There was a problem hiding this comment.
@willmot is there a better approach to store the count of repeat posts to make it quicker? Maybe a maintained meta data?
There was a problem hiding this comment.
TBH I'd be tempted to just skip showing the number in that list, I'm not sure it's worth the complexity. Especially as you'll see the count one you click the link.
There was a problem hiding this comment.
Actually, I've chatted to @johnbillion and he suggested to run a query with all parents IDs that currently on the page, that sounds like a good solution - I'm working on it atm.
When you click to see a specific post's Repeat posts, the overall number in the view link does not change! It shows count for all Repeating and Repeat posts overall. This is similar to core WP, when you click a specific author (not yourself) the view link looses the bold focus, but the count stays the same. Hope that makes sense.
…aight after the main query is generated and store results in global
|
@willmot I got a bit confused with the following: what posts have Then my question is: how do we select the Do we only rely that posts have got a parent specified? Or do we also need to check that that parent has got the |
|
@willmot hm, I have just created a new post and set it to be published yesterday. In the DB I can see meta for both the original Repeating post and a newly scheduled Repeat post for today. Is that correct? |
|
@willmot that last 2 comments - there is an inception bug with saving post & meta 😱 I think I got a solution. Gonna raise a separate issue and put this one on hold. |
willmot
left a comment
There was a problem hiding this comment.
Needs issues outlined above fixing up before it can be merged.
Add a row link to each Repeating post with the count of its Repeat posts and ability to view only them.
Relates to #11
Questions:
repeatposts here - otherwise it's gonna be an expensive thing to run.